using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MusicManager : MonoBehaviour
{
    private static MusicManager instance;

    public static MusicManager Instance
    {
        get { return instance; }
    }

    AudioSource audios;

    void Awake()
    {
        instance = this;
    }

    private void Start()
    {
        audios = GetComponent<AudioSource>();
    }

    public void ChangeAudio(AudioClip ac)
    {
        audios.clip = ac;
        audios.Play();
    }

    public void MuteMusic(bool isOn)
    {
        audios.mute = !isOn;
    }

    public void ChangeMusicVolume(float v)
    {
        audios.volume = v;
    }
}
